package com.ln.controller.impl;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ln.controller.BaseController;
import com.ln.pojo.impl.TestPOJO;
/**
 * 收藏笔记
 */
@Controller
@RequestMapping("test")
public class TestController extends BaseController {
	
	@RequestMapping(value = "index/{path}", method = RequestMethod.GET)
	public String index(@PathVariable("path") String path) {
		System.out.println("==>TestController.index()");
		return "test/"+path;
	}
	
	@RequestMapping(value = "json", method = RequestMethod.POST)
	@ResponseBody
	public Object test(TestPOJO test) {
		System.out.println("==> "+test);
		return test;
	}
	
}